// 博客文章接口
export interface BlogPost {
  id: string
  title: string
  summary: string
  content?: string
  coverImage?: string
  publishDate: string
  updateDate?: string
  category: string
  tags: string[]
  readTime: string
  views: number
  likes: number
  author?: string
  slug?: string
  status?: 'published' | 'draft' | 'archived'
}

// 精选文章接口（扩展了封面图片字段）
export interface FeaturedPost extends BlogPost {
  coverImage: string
}

// 标签接口
export interface Tag {
  name: string
  count: number
  color?: string
  icon?: string
  description?: string
}

// 评论接口
export interface Comment {
  id: string
  author: string
  avatar?: string
  content: string
  postTitle: string
  postId: string
  createTime: string
  replyTo?: string
  likes?: number
}

// 分类接口
export interface Category {
  id: string
  name: string
  description?: string
  count: number
  slug: string
  color?: string
}

// 网站统计接口
export interface SiteStats {
  totalPosts: number
  totalViews: number
  totalTags: number
  runningDays: number
  totalCategories?: number
  totalComments?: number
}

// 用户信息接口
export interface UserInfo {
  name: string
  avatar: string
  bio: string
  location: string
  website?: string
  github?: string
  twitter?: string
  email?: string
}

// 分页接口
export interface Pagination {
  current: number
  pageSize: number
  total: number
  hasNext: boolean
  hasPrev: boolean
}

// API响应接口
export interface ApiResponse<T> {
  success: boolean
  data: T
  message?: string
  pagination?: Pagination
}

// 搜索结果接口
export interface SearchResult {
  posts: BlogPost[]
  total: number
  query: string
  time: number
}

// 文章筛选参数接口
export interface PostFilter {
  category?: string
  tags?: string[]
  dateRange?: [string, string]
  keyword?: string
  status?: BlogPost['status']
  sortBy?: 'date' | 'views' | 'likes'
  order?: 'asc' | 'desc'
}
